From tllynch at comcast.net Tue Jan 6 15:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue Jan 6 20:14:11 2004 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 13:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Jan 7 13:08:29 2004 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj@www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 15:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed Jan 7 13:56:37 2004 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 13:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Jan 7 13:58:33 2004 Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 14:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Jan 7 14:21:58 2004 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj@www.linux.org.uk From ari.suutari at syncrontech.com Thu Jan 8 08:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu Jan 8 06:39:04 2004 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 14:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jan 9 14:40:13 2004 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj@www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 15:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon Jan 12 14:41:58 2004 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling@lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 16:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon Jan 12 15:15:34 2004 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling@lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 16:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon Jan 12 15:42:31 2004 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller@iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Tue Jan 13 00:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Jan 13 00:11:59 2004 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj@www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 12:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue Jan 13 11:35:30 2004 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling@lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 10:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed Jan 14 10:50:39 2004 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Wed Jan 14 00:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Thu Jan 15 12:46:07 2004 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 10:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue Jan 27 08:16:18 2004 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 08:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Jan 27 08:40:15 2004 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj@www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 12:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu Jan 29 17:55:44 2004 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment.html From htodd at twofifty.com Thu Jan 29 10:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu Jan 29 17:59:56 2004 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd@twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 10:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu Jan 29 18:02:56 2004 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd@twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 13:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu Jan 29 18:51:16 2004 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 13:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu Jan 29 18:57:54 2004 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root@localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root@localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root@localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root@localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root@localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root@localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0001.html From taj at www.linux.org.uk Fri Jan 30 08:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jan 30 08:51:06 2004 Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root@localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root@localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 09:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jan 30 08:59:38 2004 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj@www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 09:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri Jan 30 09:58:44 2004 Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 10:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jan 30 10:49:17 2004 Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj@www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 11:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri Jan 30 11:52:47 2004 Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 14:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri Jan 30 14:48:09 2004 Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj@www.linux.org.uk ===== Ewan Harrow ewan@harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 20:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Fri Jun 3 17:46:03 2005 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 13:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:03 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj@www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 13:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 17:46:03 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 13:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:03 2005 Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 14:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:03 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj@www.linux.org.uk From ari.suutari at syncrontech.com Thu Jan 8 06:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 17:46:03 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 14:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:03 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj@www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 14:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Fri Jun 3 17:46:03 2005 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling@lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 15:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Fri Jun 3 17:46:03 2005 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling@lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 15:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Fri Jun 3 17:46:03 2005 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller@iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Tue Jan 13 00:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:03 2005 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj@www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 11:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Fri Jun 3 17:46:03 2005 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling@lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 10:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Fri Jun 3 17:46:03 2005 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 23:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Fri Jun 3 17:46:03 2005 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 08:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 17:46:04 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 08:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:04 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj@www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 17:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Fri Jun 3 17:46:04 2005 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment.htm From htodd at twofifty.com Thu Jan 29 18:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Fri Jun 3 17:46:04 2005 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd@twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 18:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Fri Jun 3 17:46:04 2005 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd@twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 18:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri Jun 3 17:46:04 2005 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 18:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Fri Jun 3 17:46:04 2005 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root@localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root@localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root@localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root@localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root@localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root@localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment.htm From taj at www.linux.org.uk Fri Jan 30 08:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:04 2005 Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root@localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root@localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 09:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:04 2005 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj@www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 09:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri Jun 3 17:46:04 2005 Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 10:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:04 2005 Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj@www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 11:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri Jun 3 17:46:05 2005 Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 14:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri Jun 3 17:46:05 2005 Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj@www.linux.org.uk ===== Ewan Harrow ewan@harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 20:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Fri Jun 3 18:08:25 2005 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 13:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:25 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj@www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 13:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 13:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 14:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj@www.linux.org.uk From ari.suutari at syncrontech.com Thu Jan 8 06:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 14:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj@www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 14:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling@lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 15:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling@lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 15:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller@iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Tue Jan 13 00:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj@www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 11:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling@lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 10:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 23:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 08:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 08:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj@www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 17:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0001.htm From htodd at twofifty.com Thu Jan 29 18:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Fri Jun 3 18:08:26 2005 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd@twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 18:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Fri Jun 3 18:08:27 2005 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd@twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 18:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri Jun 3 18:08:27 2005 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 18:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Fri Jun 3 18:08:27 2005 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root@localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root@localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root@localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root@localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root@localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root@localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0001.htm From taj at www.linux.org.uk Fri Jan 30 08:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:27 2005 Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root@localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root@localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 09:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:27 2005 Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj@www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 09:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri Jun 3 18:08:27 2005 Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 10:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:27 2005 Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj@www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 11:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri Jun 3 18:08:27 2005 Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 14:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri Jun 3 18:08:27 2005 Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj@www.linux.org.uk ===== Ewan Harrow ewan@harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0395.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0395.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0396.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0396.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0397.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0397.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0398.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0398.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0399.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0399.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0400.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0400.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0401.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0401.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0402.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0402.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0403.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0403.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0404.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0404.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0001.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0001.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0002.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0002.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0003.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0003.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0004.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0004.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0005.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0005.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0006.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0006.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0007.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0007.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0008.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0008.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0009.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0009.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0010.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0010.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0001.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0001.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0002.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0002.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0003.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0003.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0004.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0004.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0005.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0005.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0006.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0006.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0007.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0007.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0008.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0008.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0009.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0009.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0010.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0010.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0001.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0001.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0002.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0002.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0003.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0003.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0004.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0004.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0005.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0005.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0006.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0006.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0007.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0007.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0008.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0008.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0009.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0009.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0010.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0010.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0011.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0011.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0012.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0012.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0013.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0013.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0014.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0014.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0015.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0015.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0016.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0016.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0017.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0017.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0018.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0018.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0019.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0019.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0020.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0020.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0021.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0021.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0022.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0022.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0023.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0023.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0024.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0024.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0025.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0025.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0026.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0026.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0027.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0027.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0028.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0028.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0029.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0029.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0030.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0030.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0031.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0031.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0032.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0032.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0033.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0033.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0034.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0034.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0035.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0035.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0036.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0036.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0037.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0037.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0038.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0038.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0039.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0039.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0040.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0040.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0041.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0041.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0042.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0042.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0043.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0043.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0044.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0044.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0045.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0045.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0046.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0046.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0047.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0047.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0048.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0048.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0049.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0049.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0050.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0050.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0051.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0051.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0052.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0052.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0053.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0053.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0054.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0054.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0055.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0055.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0056.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0056.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0057.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0057.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0058.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0058.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0059.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0059.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0060.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0060.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0061.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0061.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0062.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0062.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0063.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0063.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0064.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0064.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0065.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0065.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0066.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0066.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0067.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0067.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0068.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0068.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0069.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0069.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0070.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0070.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0071.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0071.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0072.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0072.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0073.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0073.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0074.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0074.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0075.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0075.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0076.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0076.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0077.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0077.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Thu, 8 Jan 2004 08:39:18 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401080839.18034.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > you dont mind (nice css btw). No problem. To clarify, I must say that the software has not been written by me, I have just been maintaining it since the original authors didn't have time/interest for it any more. (and I had projects using that stuff) Ari S. From taj at www.linux.org.uk Fri Jan 9 07:40:51 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 9 Jan 2004 14:40:51 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401080839.18034.ari.suutari@syncrontech.com> Message-ID: On Thu, 8 Jan 2004, Ari Suutari wrote: > Hi, > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > I'll also put a link to your project at www.syncrontech.org on rxtx.org if > > you dont mind (nice css btw). > > No problem. To clarify, I must say that the software has > not been written by me, I have just been maintaining it since > the original authors didn't have time/interest for it any more. > (and I had projects using that stuff) > Hi Ari I was able to reproduce the bug with your sample code on w32 and linux also. This is great news. I started hacking on the fix. I guess I missed the memo on JNI 1.1->1.2 (and 1.4). When that is done Saturday, I'll finish the FreeBSD compile fixes too. I'm placing the link to the project you now maintain on the links page. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Mon Jan 12 07:44:15 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 15:44:15 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 Message-ID: <200401121544.15170.joerling@lkv-wl.de> Hello to all, first I installed rxtx 2.1.6 on a SuSE Linux 8.0 system. All worked fine. Now I want to install it on a SuSE 8.2 system. But a run of make gets the following: -------------------------------------------------------------------------------------------- gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 -6/src/SerialImp.c -fPIC -DPIC -o /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before "creation" /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-6.* (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 ----------------------------------------------------------------------- The preceding run of configure before warned me as follows: -------------------------------------------- checking os.version 2.4.20-4GB WARNING: Kernel include files do not match the current kernel ------------------------------------------------------------------------------------------ Does anbody know what to do? Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From joerling at lkv-wl.de Mon Jan 12 08:17:54 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-15?q?J=F6rling?=) Date: Mon, 12 Jan 2004 16:17:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <200401121617.54329.joerling@lkv-wl.de> Sorry, I forgot the following: java -version.......................1.4.2_03-b02 uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux autoconf --version..............command not found automake --version........... command not found libtool --version.................. command not found make --version................... GNU Make 3.80 Sincerely Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From cdaller at iicm.tu-graz.ac.at Mon Jan 12 08:43:54 2004 From: cdaller at iicm.tu-graz.ac.at (Christof Dallermassl) Date: Mon, 12 Jan 2004 16:43:54 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121544.15170.joerling@lkv-wl.de> References: <200401121544.15170.joerling@lkv-wl.de> Message-ID: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Hi! there is a strange (and wrong) linebreak in SerialImp, simply remove that and it'll compile. Werner> But a run of make gets the following: Werner> -------------------------------------------------------------------------------------------- Werner> gcc -I/home/hlk/rxtx-2.1-6 -Ii686-pc-linux-gnu -I. -I/usr/lib/java/include Werner> -I/usr/lib/java/i nclude/./linux/ -g -O2 -D_POSIX_SOURCE Werner> -D_BSD_SOURCE -D__need_timespec -c /home/hlk/rxtx-2.1 Werner> -6/src/SerialImp.c -fPIC -DPIC -o Werner> /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu/SerialImp.lo Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079: error: parse error before Werner> "creation" Werner> /home/hlk/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character Werner> rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* Werner> .libs/librxtxSerial-2.1-6.* Werner> (cd /home/hlk/rxtx-2.1-6/i686-pc-linux-gnu && ln -s SerialImp.lo SerialImp.o) Werner> ln: `SerialImp.o': File exists Werner> make: *** [i686-pc-linux-gnu/librxtxSerial.la] Fehler 1 Werner> ----------------------------------------------------------------------- mit freundlichen Gruessen Christof -- --------------------------------------------------------------------------- Christof Dallermassl / Institute for Information Processing and Computer cdaller at iicm.edu / Supported new Media, Graz University of Technology --------------------------------------------------------------------------- Dino Developer Community - be a part of it - http://www.dinopolis.org From taj at www.linux.org.uk Mon Jan 12 17:13:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 13 Jan 2004 00:13:23 +0000 (GMT) Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <200401121617.54329.joerling@lkv-wl.de> Message-ID: On Mon, 12 Jan 2004, Werner [iso-8859-15] J?rling wrote: > > Sorry, > > I forgot the following: > > java -version.......................1.4.2_03-b02 > uname -a.............................Linux 2.4.20-4GB 2003 i686 GNU/Linux > autoconf --version..............command not found > automake --version........... command not found > libtool --version.................. command not found > make --version................... GNU Make 3.80 > Hi Werner Yep.. that line mentions needs to have an '\' on the end. New versions of gcc complain rightly so. This is fixed in the 2.1.7pre code. There will be no 2.1.6 fix. But distributers are free to grab it and fix a local copy. I really encourage distributers to ship what is needed with their products. -- Trent Jarvi taj at www.linux.org.uk From joerling at lkv-wl.de Tue Jan 13 04:38:04 2004 From: joerling at lkv-wl.de (Werner =?iso-8859-1?q?J=F6rling?=) Date: Tue, 13 Jan 2004 12:38:04 +0100 Subject: [Rxtx] rxtx 2.1.6: make does not work on SuSE 8.2 In-Reply-To: <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> References: <200401121544.15170.joerling@lkv-wl.de> <16386.49338.345580.819111@fiicmpc57.tu-graz.ac.at> Message-ID: <200401131238.04316.joerling@lkv-wl.de> Am Montag, 12. Januar 2004 16:43 schrieb Christof Dallermassl: > there is a strange (and wrong) linebreak in SerialImp, simply remove > that and it'll compile. You are right, now it does. Thank you, Werner -- Landeskontrollverband Westfalen-Lippe e.V. Nevinghoff 40 48147 M?nster Fon (02 51) 2 30 07-31 Fax (02 51) 2 30 07-62 mailto:joerling at lkv-wl.de http://www.lkv-wl.de/ From daniel.santos at emation.pt Wed Jan 14 03:50:08 2004 From: daniel.santos at emation.pt (Daniel Santos) Date: Wed, 14 Jan 2004 10:50:08 -0000 Subject: [Rxtx] Compiling from CVS Message-ID: Hello! I checked out the rxtx-devel tag from cvs and tried to compile on win32 with mingw. I am getting an error with gcc. A file fuserImp.c is missing. Can anyone help me ? many thanks Daniel Santos From Simone at graziosi.org Tue Jan 13 16:01:42 2004 From: Simone at graziosi.org (Simone Graziosi) Date: Wed, 14 Jan 2004 00:01:42 +0100 Subject: [Rxtx] RxTx 2.1.6 under Mac OSX Message-ID: <001201c3da29$36417680$7ae47550@PcAndrea> Please excuse me if i post a FAQ, but i read all the list and my installation is still not working. I downloaded and maually installed rxtx2.1.6 on Mac OS X, i copied jar file and libraries in the right places, and i create the /var/uucp directory with 777 permissions. Listing com ports from my code works fine, but when i try to open a port i get a gnu.io.PortInUseException: Unknown Application even if system is just started and i'm reasonably sure no other application are using serial ports. i'm using a Keyspan Usb Adapter Thank you Anyway for the work on RxTx Simone Graziosi From ari.suutari at syncrontech.com Tue Jan 27 01:19:05 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Tue, 27 Jan 2004 10:19:05 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401271019.05109.ari.suutari@syncrontech.com> Hi, I just did some testing with a released FreeBSD jdk, which is version 1.3.1. Should I expect rxtx to work with it at all, since it seems to use pthread_ calls ? I don't think that they can be used on VM that uses green threads. (in FreeBSD commapi this has been solved by creating the thread in Java and having it's run() to call a native method, which contains the actual loop. This makes things easier, you also have a valid JNIEnv pointer all the time). Ari S. On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > FreeBSD port system support many different JVM versions. > > if you could just use JAVA_HOME environment variable to > > find out the default directory everything should be fine. From taj at www.linux.org.uk Tue Jan 27 01:43:23 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 27 Jan 2004 08:43:23 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401271019.05109.ari.suutari@syncrontech.com> Message-ID: On Tue, 27 Jan 2004, Ari Suutari wrote: > Hi, > > I just did some testing with a released FreeBSD jdk, which > is version 1.3.1. Should I expect rxtx to work with it at all, > since it seems to use pthread_ calls ? I don't think that > they can be used on VM that uses green threads. > (in FreeBSD commapi this has been solved by creating the > thread in Java and having it's run() to call a native method, > which contains the actual loop. This makes things easier, you > also have a valid JNIEnv pointer all the time). > > Ari S. > > On Wednesday 07 January 2004 16:22, Trent Jarvi wrote: > > > FreeBSD port system support many different JVM versions. > > > if you could just use JAVA_HOME environment variable to > > > find out the default directory everything should be fine. > Hi Ari yes... you found a mess. I've got a shallow tree here that is trying to fix the poblem and there are some comanies interested in seeing a fix but I'm strung out here with my free time. The basic issue is I did some fixes for rxtx on solaris. The solaris jre is really good and swallowed my changes. java on other platforms is less predictable. This is not a slam on other platforms. RXTX (me) did things wrong. I dont know what to do here. I've got some basic fixes but I'm missing some work I'm really short on time but would like to share. -- Trent Jarvi taj at www.linux.org.uk From hugosg at media.mit.edu Thu Jan 29 10:54:50 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 12:54:50 -0500 Subject: [Rxtx] Installing RXTX in Fedora Message-ID: Hi, I just wonder if somebody has mange to install RXTX in Fedora. Before going into details. Has anybody compile sucessufly the RXTX in Fedora? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/132f4cf4/attachment-0078.html From htodd at twofifty.com Thu Jan 29 11:00:08 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:00:08 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > Before going into details. Has anybody compile sucessufly the RXTX in > Fedora? Sorry for the aol-ish message, but I tried for a while before giving up and moving on. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From htodd at twofifty.com Thu Jan 29 11:03:15 2004 From: htodd at twofifty.com (Hisashi T Fujinaka) Date: Thu, 29 Jan 2004 10:03:15 -0800 (PST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > Before going into details. Has anybody compile sucessufly the RXTX in > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > and moving on. Let me clarify that. I think I got it to compile and install, but the reason I installed it -- the "OneWireViewer" from Dallas Semiconductor -- does not operate properly. -- Hisashi T Fujinaka - htodd at twofifty.com BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte From rwelty at averillpark.net Thu Jan 29 11:48:46 2004 From: rwelty at averillpark.net (Richard Welty) Date: Thu, 29 Jan 2004 13:48:46 -0500 (EST) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: References: Message-ID: On Thu, 29 Jan 2004 10:03:15 -0800 (PST) Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. i have a customer requirement for RXTX on fedora, so if nobody else has gotten it working, i guess it'll be my turn in the barrel shortly. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From hugosg at media.mit.edu Thu Jan 29 11:51:17 2004 From: hugosg at media.mit.edu (Hugo Solis) Date: Thu, 29 Jan 2004 13:51:17 -0500 Subject: [Rxtx] Instalation in Fedora Message-ID: <40195625.3030304@media.mit.edu> Hi, (and thanks in advance!) I'm Trying to install RXTX in fedora and I'm having some problems. Since I'm not an expert in unix and programing maybe i'm missing something obious or there is a fast solution. I will descibe all the steps I'm doing. Just in case I'm root and my java is in my Path. Get the rxtx-2.1-6.tar.gx file Unzip and untar. I get the folder. I run ./configure and I get these message wich I asume are Ok, even the waring of the Kernel [root at localhost rxtx-2.1-6]# ./configure checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu configure: WARNING: Trying libtool. If the following fails install libtool checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for a sed that does not truncate output... /bin/sed checking for egrep... grep -E checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 32768 checking command to parse /usr/bin/nm -B output from gcc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if gcc static flag works... yes checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ supports -c -o file.o... yes checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking dependency style of gcc... none checking dependency style of g++... none checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/fcntl.h usability... yes checking sys/fcntl.h presence... yes checking for sys/fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking grp.h usability... yes checking grp.h presence... yes checking for grp.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking whether gcc needs -traditional... no checking whether to enable maintainer-specific portions of Makefiles... no checking java.home /usr/local/share/java/j2sdk1.4.2_03/jre adjusted java.home is /usr/local/share/java/j2sdk1.4.2_03 checking os.name Linux checking os.arch i386 checking java.vendor Sun Microsystems Inc. checking java.version 1.4.2_03 checking os.version 2.4.22-1.2115.nptl WARNING: Kernel include files do not match the current kernel configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands [root at localhost rxtx-2.1-6]# -------------------------------------------------------------- I get the Makefile, I check that Java is well located and I type make, I get: [root at localhost rxtx-2.1-6]# make /usr/local/share/java/j2sdk1.4.2_03/bin/javac -classpath .:/home/hugosg/radio/rxtx-2.1-6:/home/hugosg/radio/rxtx-2.1-6/src: -d /home/hugosg/radio/rxtx-2.1-6/ -O /home/hugosg/radio/rxtx-2.1-6/src/CommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortEnumerator.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortIdentifier.java /home/hugosg/radio/rxtx-2.1-6/src/CommPort.java /home/hugosg/radio/rxtx-2.1-6/src/CommPortOwnershipListener.java /home/hugosg/radio/rxtx-2.1-6/src/Configure.java /home/hugosg/radio/rxtx-2.1-6/src/I2C.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/I2CPort.java /home/hugosg/radio/rxtx-2.1-6/src/LPRPort.java /home/hugosg/radio/rxtx-2.1-6/src/NoSuchPortException.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/ParallelPort.java /home/hugosg/radio/rxtx-2.1-6/src/PortInUseException.java /home/hugosg/radio/rxtx-2.1-6/src/Raw.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RawPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RawPort.java /home/hugosg/radio/rxtx-2.1-6/src/RS485.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/RS485PortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/RS485Port.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXCommDriver.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java /home/hugosg/radio/rxtx-2.1-6/src/RXTXVersion.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEvent.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPortEventListener.java /home/hugosg/radio/rxtx-2.1-6/src/SerialPort.java /home/hugosg/radio/rxtx-2.1-6/src/UnsupportedCommOperationException.java Note: /home/hugosg/radio/rxtx-2.1-6/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. /usr/local/share/java/j2sdk1.4.2_03/bin/jar cf RXTXcomm.jar gnu/* mkdir /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# At this point I don't know if I'm going good or not since I get the RXTXcomm.jar but also an error. Any way I proccede with the make install and I get: [root at localhost rxtx-2.1-6]# make install gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. -I/usr/local/share/java/j2sdk1.4.2_03/include -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing terminating " character /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function `check_group_uucp': /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error before "creation" /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing terminating " character libtool: link: `/home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/SerialImp.lo' is not a valid libtool object make: *** [i686-redhat-linux-gnu/librxtxSerial.la] Error 1 [root at localhost rxtx-2.1-6]# I really apreciate any kind of help or suggestion! Thansk a lot Hugo Solis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040129/4f59bb72/attachment-0078.html From taj at www.linux.org.uk Fri Jan 30 01:51:39 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 08:51:39 +0000 (GMT) Subject: [Rxtx] Re: Instalation in Fedora In-Reply-To: <40195625.3030304@media.mit.edu> Message-ID: On Thu, 29 Jan 2004, Hugo Solis wrote: > Hi, (and thanks in advance!) > I'm Trying to install RXTX in fedora and I'm having some problems. Since > I'm not an expert in unix and programing maybe i'm missing something > obious or there is a fast solution. I will descibe all the steps I'm > doing. Just in case I'm root and my java is in my Path. > Get the rxtx-2.1-6.tar.gx file > Unzip and untar. I get the folder. > I run ./configure and I get these message wich I asume are Ok, even the > waring of the Kernel > > > [root at localhost rxtx-2.1-6]# ./configure > > I get the Makefile, I check that Java is well located and I type make, I > get: > > [root at localhost rxtx-2.1-6]# make > gcc -I/home/hugosg/radio/rxtx-2.1-6 -Ii686-redhat-linux-gnu -I. > -I/usr/local/share/java/j2sdk1.4.2_03/include > -I/usr/local/share/java/j2sdk1.4.2_03/include/./linux/ -g -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c -fPIC -DPIC -o > /home/hugosg/radio/rxtx-2.1-6/i686-redhat-linux-gnu/.libs/SerialImp.o > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5078:30: missing > terminating " character > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c: In function > `check_group_uucp': > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079: error: syntax error > before "creation" > /home/hugosg/radio/rxtx-2.1-6/src/SerialImp.c:5079:25: missing > terminating " character > libtool: link: Hi Hugo In SerialImp.c on line 5079, the line needs to be joined with the next line. The problem will look romething like: report("this is a really long string that has a return in it someplace"); For example: report("this is a really long string that has a return in it someplace"); gcc now correctly reports that as an error. You should be able to type make install and get a working library installed after that. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Jan 30 02:00:14 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 09:00:14 +0000 (GMT) Subject: [Rxtx] Installing RXTX in Fedora In-Reply-To: Message-ID: On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > On Thu, 29 Jan 2004, Hisashi T Fujinaka wrote: > > > On Thu, 29 Jan 2004, Hugo Solis wrote: > > > > > Hi, I just wonder if somebody has mange to install RXTX in Fedora. > > > Before going into details. Has anybody compile sucessufly the RXTX in > > > Fedora? > > > > Sorry for the aol-ish message, but I tried for a while before giving up > > and moving on. > > Let me clarify that. I think I got it to compile and install, but the > reason I installed it -- the "OneWireViewer" from Dallas Semiconductor > -- does not operate properly. > > The most common problem is failure to add the user to group uucp or lock depending on the system. A quick test of this theory is to try the application as root if the machine is not critial. If that works, the section on lockfiles in the INSTALL document that comes with the source will help. Another more dangerous option is to comfigure rxtx with lockfiles disabled. ./configure --disable-lockfiles If its something else, please let us know what was going on. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 02:39:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 09:39:21 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial Message-ID: <16081-48017@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From taj at www.linux.org.uk Fri Jan 30 03:49:47 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 30 Jan 2004 10:49:47 +0000 (GMT) Subject: [Rxtx] Read problem with usb-serial In-Reply-To: <16081-48017@sneakemail.com> Message-ID: On Fri, 30 Jan 2004, Ewan Harrow wrote: > Hi > > I'm trying in vain to read from a serial barcode scanner attached to a > linux box running a 2.6.1 kernel via a usb-serial converter. Reading > from it works fine "natively" (using minicom and a python script) > however using the comm api it fails. In fact none of the comm samples > such as blackbox, serialdemo or simpleread work either - they just > appear to sit there. > > Having inserted debug into the SimpleRead code I can see it does > connect to the port and even receives events for data available however > the data read is always "empty" or "0" when printed to the console. A > further twist is that if I unplug/plugin the usb cable and run > SimpleRead again it partially works - returning the first four bytes > before reverting to the reading but not acually giving data as a above. > What is interesting is that the number of bytes read during a read > does correspond with the expected number of bytes. > > Figuring this to be poor java/comm support I booted back into windows > and tried the same code using Sun's win32 bits and pieces and it works > fine as expected. I then swapped Sun's bits for the rxtx win32 dll > etc. and it behaves in the same way as the linux version (at least it > is consistent). > > The usb-serial converter is a Prolific PL2303 and is fully supported in > 2.6. The tested code is the same as the commapi SimpleRead sample with > sysout statements added and the hardcoded serial port changed to > /dev/usb/tts/0. > Hi Ewan It probably makes sense to set a timeout and threshold on the port via the Java API. I would also set the serial port parameters to exactly what you expect (9600,8,N,1)? But I think its the timeouts and You are probably seeing a difference in defaults between rxtx and Sun's commapi. That could be whats happening. There is a read thats not returning waiting to obtain the full length of data requested. When you pull the plug, the read errors and returns. The method doing the read is read_byte_array() You can probably see it hanging in select() without timeouts. One note on timeouts when using rxtx. The programmer that wrote the original commapi had a finer resolution in w32 than on Unix. The minimum timeout with rxtx is 100 otherwise the code will round it off to 0. ttyset.c_cc[ VTIME ] = timeout/100; rxtx does that same calculation on w32 and Unix so they behave the same. -- Trent Jarvi taj at www.linux.org.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 04:53:21 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 11:53:21 +0000 (GMT) Subject: [Rxtx] usb-serial read problem Message-ID: <17512-23283@sneakemail.com> Hi I'm trying in vain to read from a serial barcode scanner attached to a linux box running a 2.6.1 kernel via a usb-serial converter. Reading from it works fine "natively" (using minicom and a python script) however using the comm api it fails. In fact none of the comm samples such as blackbox, serialdemo or simpleread work either - they just appear to sit there. Having inserted debug into the SimpleRead code I can see it does connect to the port and even receives events for data available however the data read is always "empty" or "0" when printed to the console. A further twist is that if I unplug/plugin the usb cable and run SimpleRead again it partially works - returning the first four bytes before reverting to the reading but not acually giving data as a above. What is interesting is that the number of bytes read during a read does correspond with the expected number of bytes. Figuring this to be poor java/comm support I booted back into windows and tried the same code using Sun's win32 bits and pieces and it works fine as expected. I then swapped Sun's bits for the rxtx win32 dll etc. and it behaves in the same way as the linux version (at least it is consistent). The usb-serial converter is a Prolific PL2303 and is fully supported in 2.6. The tested code is the same as the commapi SimpleRead sample with sysout statements added and the hardcoded serial port changed to /dev/usb/tts/0. Help appreciated. Ewan ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From 3mkrc7902 at sneakemail.com Fri Jan 30 07:48:47 2004 From: 3mkrc7902 at sneakemail.com (Ewan Harrow) Date: Fri, 30 Jan 2004 14:48:47 +0000 (GMT) Subject: [Rxtx] Re: Rxtx Digest, Vol 10, Issue 9 In-Reply-To: <20040130120002.C66FA7343A@mail.linuxgrrls.org> Message-ID: <32158-58383@sneakemail.com> Ok I have been playing a bit more setting the following params but little or no change. serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); serialPort.enableReceiveTimeout(500); serialPort.enableReceiveThreshold(20); System.out.println("Timeout enabled: " + serialPort.isReceiveTimeoutEnabled()); System.out.println("Threshold enabled: " + serialPort.isReceiveThresholdEnabled()); I still only get the first few bytes. --- "rxtx-request-at-linuxgrrls.org |newsgroups|" > Hi >It probably makes sense to set a timeout and threshold on the >port via the Java API. I would also set the serial port parameters to >exactly what you expect (9600,8,N,1)? But I think its the timeouts and >You are probably seeing a difference in defaults between rxtx and Sun's >commapi. > >That could be whats happening. There is a read thats not returning >waiting to obtain the full length of data requested. When you pull the >plug, the read errors and returns. The method doing the read is >read_byte_array() You can probably see it hanging in select() >without timeouts. > >One note on timeouts when using rxtx. The programmer that wrote the >original commapi had a finer resolution in w32 than on Unix. The >minimum >timeout with rxtx is 100 otherwise the code will round it off to 0. > > ttyset.c_cc[ VTIME ] = timeout/100; > >rxtx does that same calculation on w32 and Unix so they behave the >same. > -- >Trent Jarvi >taj at www.linux.org.uk ===== Ewan Harrow ewan at harrow.org +44 (0) 7092 108950 http://www.ewanharrow.com ___________________________________________________________ BT Yahoo! Broadband - Free modem offer, sign up online today and save ?80 http://btyahoo.yahoo.co.uk From tllynch at comcast.net Tue Jan 6 13:18:51 2004 From: tllynch at comcast.net (Tom Lynch) Date: Tue, 06 Jan 2004 15:18:51 -0500 Subject: [Rxtx] Another person trying to read from the lp0 Message-ID: <1073420330.1109.50.camel@localhost.localdomain> I have a printer that can report its status through the parallel port. If only I were able to read it! I can write to the printer using RXTX fine. I use this code to open an output stream: try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parportOut.getOutputStream(); ps = new PrintStream(outputStream); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to printer"); ioe.printStackTrace(); } And I can print to my heart's content. I use similiar code to open an input stream. However, this throws a null pointer exception at 'inputStream = parport.getInputStream();' try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { // this throws NullPointerException inputStream = parportIn.getInputStream(); } catch (IOException e) { e.printStackTrace(); } } catch(Exception ioe){ javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from printer"); ioe.printStackTrace(); } Any suggestions? My boss really wants to be able to monitor the state of the printer. Thank you very much -tl -- From taj at www.linux.org.uk Wed Jan 7 06:08:26 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:08:26 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: On Wed, 17 Dec 2003, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown > Source) > at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown > Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) > at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > Hi Ari I finally got around to looking at this some more. Right now I have more questions than answers with the important problem. I'm curious. Is this an SMP machine? Would you happen to be moving large files when this happens? With the jre and -Xcheck:jni, do you know of any jre's available without agreeing to the Sun Community Source License that are capable of identifying the JNIEnv thread variable problem? This was not showing up in the FreeBSD 1.3.1-0 jre. It looks like there may be binary compatability on freebsd allowing you to run most anything :) I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in Linux but it must only happen with the devel versions of the jre which are offered as patches against Sun's code at this point? With rxtx:2.1... I also see there are some build problems. I fixed all but two at this point. libtool is not linking to the pthread library and fuser.c was not being compiled. I'll have to look further into the libtool issue; its swallowing the options I give it. Here are the commands I used to compile a functional native lib. gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/SerialImp.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/SerialImp.o gcc -I/root/rxtx-2.1-7pre17/build -Ii386-unknown-freebsd4.9 -I. -I/java/include -I/java/include/./freebsd/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /root/rxtx-2.1-7pre17/build/../src/psmisc/fuser.c -fPIC -o /root/rxtx-2.1-7pre17/build/i386-unknown-freebsd4.9/.libs/fuser.o ld -share -lc_r i386-unknown-freebsd4.9/.libs/fuser.o i386-unknown-freebsd4.9/.libs/SerialImp.o -o i386-unknown-freebsd4.9/.libs/librxtxSerial.so cp i386-unknown-freebsd4.9/.libs/librxtxSerial.so /java/jre/lib/i386 Once I figure out what is wrong with libtool I'll fix that too. I also took the liberty to add a make -p .../java/jre/lib/ext to the Makefile to the jar can be added to the default classpath if make install is performed. If you have a known prefered location of freebsd, that could be changed. finally, the lock file problems are also resolved. -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 06:56:28 2004 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 7 Jan 2004 15:56:28 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: References: Message-ID: <200401071556.28678.ari.suutari@syncrontech.com> Hi, On Wednesday 07 January 2004 15:08, Trent Jarvi wrote: > Hi Ari > > I finally got around to looking at this some more. Right now I have more > questions than answers with the important problem. > > I'm curious. Is this an SMP machine? Would you happen to be moving large > files when this happens? This is a P4 machine with hyperthreading enabled. So, it is kind-of SMP. The machine was idle when the problem occurred. I can duplicate this also with RedHat linux 8.0 (kernel 2.4.18), ordinary P4, no hyperthreading or SMP at all. The JDK version is linux jdk 1.4.2_01, from Sun. > > With the jre and -Xcheck:jni, do you know of any jre's available without > agreeing to the Sun Community Source License that are capable of > identifying the JNIEnv thread variable problem? This was not showing up > in the FreeBSD 1.3.1-0 jre. It looks like there may be binary > compatability on freebsd allowing you to run most anything :) It might be so that 1.3 jdk doesn't check things so much, since on freebsd, 1.3.1 jdk doesn't use hotspot, it uses green threads. > > I installed FreeBSD 5.2 and 4.9 in vmware after not seeing the error in > Linux but it must only happen with the devel versions of the jre which are > offered as patches against Sun's code at this point? I think that you need to have 1.4 jdk for testing, maybe 1.4.2 if possible. Also, if you would like, I can send you off-list source code for a simple test program that crashes rxtx on freebsd and linux. Ari S. > > With rxtx:2.1... > > I also see there are some build problems. I fixed all but two at this > point. libtool is not linking to the pthread library and fuser.c was not > being compiled. Hmm, there is -lc_r, which *is* one of the pthread libraries available on freebsd. So no problem there, I think. -pthread option is no longer used in FreeBSD 5.2. > > I also took the liberty to add a make -p .../java/jre/lib/ext to the > Makefile to the jar can be added to the default classpath if make install > is performed. If you have a known prefered location of freebsd, that > could be changed. FreeBSD port system support many different JVM versions. if you could just use JAVA_HOME environment variable to find out the default directory everything should be fine. Eventually, it would be nice to get rxtx package into FreeBSD ports collection, after that it would be very easy to install it. I once wrote necessary stuff for bsd-licensed commapi implementation (available at www.syncrontech.org), I guess it would be easy to write something similar for rxtx. > finally, the lock file problems are also resolved. Great ! Ari S. From taj at www.linux.org.uk Wed Jan 7 06:58:41 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 13:58:41 +0000 (GMT) Subject: [Rxtx] Another person trying to read from the lp0 In-Reply-To: <1073420330.1109.50.camel@localhost.localdomain> Message-ID: On Tue, 6 Jan 2004, Tom Lynch wrote: > I have a printer that can report its status through the parallel port. > If only I were able to read it! > > I can write to the printer using RXTX fine. I use this code to open an > output stream: > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportOut = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > outputStream = parportOut.getOutputStream(); > ps = new PrintStream(outputStream); > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to write to > printer"); > ioe.printStackTrace(); > } > > And I can print to my heart's content. > > I use similiar code to open an input stream. However, this throws a > null pointer exception at 'inputStream = parport.getInputStream();' > > try{ > gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); > parportIn = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", > CommPortIdentifier.PORT_PARALLEL); > try { > // this throws NullPointerException > inputStream = parportIn.getInputStream(); > > } > catch (IOException e) { > e.printStackTrace(); > } > } > catch(Exception ioe){ > javax.swing.JOptionPane.showMessageDialog(null, "Unable to read from > printer"); > ioe.printStackTrace(); > } > > > Any suggestions? My boss really wants to be able to monitor the state > of the printer. > > Thank you very much > > -tl > > > > Most of the problems with reading involve w32 or trying to change printer modes in linux. The code is not mature but should be able to do simple things on linux. Perhaps with a little tweaking. This may not be the only problem you run into but its not a serious problem. You really don't want to open the port twice which happens underneath each time with: parPortDriver.getCommPort("/dev/lp0",CommPortIdentifier.PORT_PARALLEL); The following does not give the error mentioned and performs the same task: import gnu.io.*; import java.io.*; import java.util.*; public class PrintTest { public static void main( String[] args ) { ParallelPort parport; OutputStream outputStream; InputStream inputStream; PrintStream ps; try{ gnu.io.RXTXCommDriver parPortDriver = new RXTXCommDriver(); parport = (ParallelPort)parPortDriver.getCommPort("/dev/lp0", CommPortIdentifier.PORT_PARALLEL); try { outputStream = parport.getOutputStream(); ps = new PrintStream(outputStream); ps.print("ok"); // this throws NullPointerException inputStream = parport.getInputStream(); } catch (Exception e) { e.printStackTrace(); } } catch(Exception e){ e.printStackTrace(); } } } Wed Jan 07 06:51:01 $ java print Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 Wed Jan 07 06:51:23 $ java -version java version "1.4.2_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06) Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode) Wed Jan 07 06:51:33 $ uname -a Linux servertrent.korpivaara.org 2.6.0-1.104 #1 Fri Dec 19 04:32:22 EST 2003 i686 i686 i386 GNU/Linux Wed Jan 07 06:51:36 $ -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Wed Jan 7 07:22:06 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 7 Jan 2004 14:22:06 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200401071556.28678.ari.suutari@syncrontech.com> Message-ID: > FreeBSD port system support many different JVM versions. > if you could just use JAVA_HOME environment variable to > find out the default directory everything should be fine. > > Eventually, it would be nice to get rxtx package into FreeBSD > ports collection, after that it would be very easy to install > it. I once wrote necessary stuff for bsd-licensed commapi > implementation (available at www.syncrontech.org), I guess > it would be easy to write something similar for rxtx. > Hi Ari, I'll follow up off list with the sample code suggestion. I'll also put a link to your project at www.syncrontech.org on rxtx.org if you dont mind (nice css btw). -- Trent Jarvi taj at www.linux.org.uk From ari.suutari at syncrontech.com Wed Jan 7 23:39:18 2004 From: ari.suutari at syncronte